package com.entity;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * Created by wlc on 2018/5/31.
 */
public class BoneTumor {
    /**
     * 静态属性
     */
    private ArrayList<String> boneTumor_User_Information;
    private ArrayList<String> boneTumor_Visit_Information;
    private ArrayList<String> boneTumor_Check_Information;
    private ArrayList<String> boneTumor_Surgery_Information;
    private ArrayList<ArrayList<String>> boneTumor_Follow_Information;

    /**
     * 构造函数
     */
    public  BoneTumor(){ }

    public BoneTumor(ArrayList<String> boneTumor_User_Information, ArrayList<String> boneTumor_Visit_Information, ArrayList<String> boneTumor_Check_Information, ArrayList<String> boneTumor_Surgery_Information, ArrayList<ArrayList<String>> boneTumor_Follow_Information) {
        this.boneTumor_User_Information = boneTumor_User_Information;
        this.boneTumor_Visit_Information = boneTumor_Visit_Information;
        this.boneTumor_Check_Information = boneTumor_Check_Information;
        this.boneTumor_Surgery_Information = boneTumor_Surgery_Information;
        this.boneTumor_Follow_Information = boneTumor_Follow_Information;
    }
    /**
     * 动态属性
     */

    /**
     *数据成员设置和获取函数
     */
    public void setBoneTumor_User_Information(String part1){
        this.boneTumor_User_Information = new ArrayList<String>(Arrays.asList(part1.split("wlcniubi")));
    }

    public ArrayList<String> getBoneTumor_User_Information(){
        return this.boneTumor_User_Information;
    }

    public void setBoneTumor_Visit_Information(String part2){
        this.boneTumor_Visit_Information = new ArrayList<String>(Arrays.asList(part2.split("wlcniubi")));
        this.boneTumor_Visit_Information.add(0,this.boneTumor_User_Information.get(0));
    }

    public ArrayList<String> getBoneTumor_Visit_Information(){
        return this.boneTumor_Visit_Information;
    }

    public void setBoneTumor_Check_Information(String part3){
        this.boneTumor_Check_Information = new ArrayList<String>(Arrays.asList(part3.split("wlcniubi")));
        this.boneTumor_Check_Information.add(0,this.boneTumor_User_Information.get(0));
    }

    public ArrayList<String> getBoneTumor_Check_Information(){
        return this.boneTumor_Check_Information;
    }

    public void setBoneTumor_Surgery_Information(String part4){
        ArrayList<String> temp_SURGERY_INFORMATION = new ArrayList<String>(Arrays.asList(part4.split("wlcniubi")));
        List<String> temp_table = temp_SURGERY_INFORMATION.subList(temp_SURGERY_INFORMATION.size()-26,temp_SURGERY_INFORMATION.size());
        temp_SURGERY_INFORMATION.addAll(8,temp_table);
        for (int i = 0; i < 26;i++){
            temp_SURGERY_INFORMATION.remove(temp_SURGERY_INFORMATION.size()-1);
        }
        this.boneTumor_Surgery_Information = temp_SURGERY_INFORMATION;
        this.boneTumor_Surgery_Information.add(0,this.boneTumor_User_Information.get(0));
    }

    public ArrayList<String> getBoneTumor_Surgery_Information(){
        return this.boneTumor_Surgery_Information;
    }

    public void setBoneTumor_Follow_Information(String part5){
        String[] FollowParts = part5.split("FOLLOWUPPART");
        this.boneTumor_Follow_Information = new ArrayList<>();
        for (String FollowPart : FollowParts){
            ArrayList<String> temp_Follow_Information = new ArrayList<String>(Arrays.asList(FollowPart.split("wlcniubi")));
            List<String> temp_table = temp_Follow_Information.subList(temp_Follow_Information.size()-7,temp_Follow_Information.size());
            temp_Follow_Information.addAll(14,temp_table);
            for (int i = 0; i < 7;i++){
                temp_Follow_Information.remove(temp_Follow_Information.size()-1);
            }
            temp_Follow_Information.add(0,this.boneTumor_User_Information.get(0));
            this.boneTumor_Follow_Information.add(temp_Follow_Information);;
        }
    }

    public ArrayList<ArrayList<String>> getBoneTumor_Follow_Information(){
        return this.boneTumor_Follow_Information;
    }
}
